/*		
 * flash_addresses.h
 *
 *  Created on: Jan 4, 2020
 *      Author: Yannick
 *
 *	/!\ Generated from the file memory_map.xlsx NOT EDIT !!!
 */
		
#ifndef EEPROM_ADDRESSES_H_		
#define EEPROM_ADDRESSES_H_		
		
#include "main.h"		
// Change this to the amount of currently registered variables			

/* Add your addresses here. 0xffff is invalid as it marks an erased field.		
Anything below 0x00ff is reserved for system variables.		
		
Use ranges that are clear to distinguish between configurations. Address ranges can have gaps.		
Label the names clearly.		
Example: 0x0100 - 0x01ff for one class and 0x0200-0x02ff for another class would be reasonable even if they each need only 3 variables		
		
		
Important: Add your variable to the VirtAddVarTab[NB_OF_VAR] array in eeprom_addresses.c!		
		
Tip to check if a cell is intialized:		
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data) will return 1 if the address is not found or 0 if it was found.		
*/		
			



// How many axis configured 1-3		
#define ADR_AXIS_COUNT 					0x100 
// AXIS1		
#define ADR_AXIS1_CONFIG 				0x101 	// 0-2 ENC, 3-5 DRV
#define ADR_AXIS1_MAX_SPEED 			0x102 	// Store the max speed		
#define ADR_AXIS1_MAX_ACCEL 			0x103 	// Store the max accel
#define ADR_AXIS1_DEGREES 				0x104 	// 方向盘可转角度	最大1080，实际可设置到1220
#define ADR_AXIS1_POWER 				0x105 	// 扭矩大小 %
#define ADR_AXIS1_FXRATIO				0x106	// 回馈强度
#define ADR_AXIS1_FRICTION              0x107	// 自然摩擦
#define ADR_AXIS1_DAMPER                0x108	// 自然阻尼
#define ADR_AXIS1_INERTIA               0x109	// 自然惯性
#define ADR_AXIS1_IDLESPRING            0x10A	// 回盘速度
#define ADR_AXIS1_IDLESPRING            0x10A	// 回盘速度
#define ADR_AXIS1_INVERTX               0x10B	// 反向	0：不反向；1：反向
#define ADR_AXIS1_ENDSTOP 				0x10C 	// endstopstrength	
#define ADR_AXIS1_ENC_RATIO 			0x10D 	// Accel filter Lowpass
#define ADR_AXIS1_SPEEDACCEL_FILTER 	0x10E 	// Speed/Accel filter Lowpass profile	
#define ADR_AXIS1_HOME_POS_L16			0x125
#define ADR_AXIS1_HOME_POS_H16			0x126
//// AXIS2
#define ADR_AXIS2_CONFIG 				0x201 	// 0-2 ENC, 3-5 DRV
#define ADR_AXIS2_MAX_SPEED 			0x202 	// Store the max speed
#define ADR_AXIS2_MAX_ACCEL 			0x203 	// Store the max accel
#define ADR_AXIS2_DEGREES 				0x204 	// 方向盘可转角度	最大1080，实际可设置到1220
#define ADR_AXIS2_POWER 				0x205 	// 扭矩大小 %
#define ADR_AXIS2_FXRATIO				0x206	// 回馈强度
#define ADR_AXIS2_FRICTION              0x207	// 自然摩擦
#define ADR_AXIS2_DAMPER                0x208	// 自然阻尼
#define ADR_AXIS2_INERTIA               0x209	// 自然惯性
#define ADR_AXIS2_IDLESPRING            0x20A	// 回盘速度
#define ADR_AXIS2_INVERTX               0x20B	// 反向	0：不反向；1：反向
#define ADR_AXIS2_ENDSTOP 				0x20C 	// endstopstrength
#define ADR_AXIS2_ENC_RATIO 			0x20D 	// Accel filter Lowpass
#define ADR_AXIS2_SPEEDACCEL_FILTER 	0x20E 	// Speed/Accel filter Lowpass profile
#define ADR_AXIS2_HOME_POS_L16			0x210
#define ADR_AXIS2_HOME_POS_H16			0x211

// FFB Engine flash area
#define ADR_FFB_AXIS_ID					0x300
#define ADR_FFB_CF_FILTER 				0x301 	// Constant Force Lowpass		
#define ADR_FFB_FR_FILTER 				0x302 	// Friction Lowpass
#define ADR_FFB_DA_FILTER 				0x303 	// Damper Lowpass
#define ADR_FFB_IN_FILTER 				0x304 	// Inertia Lowpass
#define ADR_FFB_FR_GAINS 				0x305 	// friction 0-7 scaler, 8-15 gain		
#define ADR_FFB_DA_GAINS				0x306 	// damper 	0-7 scaler, 8-15 gain	
#define ADR_FFB_IN_GAINS 				0x307 	// inertia 	0-7 scaler, 8-15 gain
#define ADR_FFB_SP_GAINS 				0x308 	// spring 	0-7 scaler, 8-15 gain
#define ADR_FFB_PF_GAINS				0x309	// periodic	0-7 scaler, 8-15 gain

#endif /* EEPROM_ADDRESSES_H_ */



